----------------------------------------------
--[[红点系统 配置]] -- 
----------------------------------------------
local Module = {}
RDMgr = Module

-- 注册红点事件
function Module:Register(view, array)
    for _, redDot in pairs(array) do
        local nd = view.NL[redDot.ND]
        local eventName = redDot.Event
        ReddotManager:RegisterReddot(nd, eventName)
    end
end

-- 注销红点事件
function Module:UnRegister(view, array)
    for _, redDot in pairs(array) do
        local nd = view.NL[redDot.ND]
        ReddotManager:UnRegisterReddot(nd)
    end
end

-- 触发红点事件
function Module:Trigger(event, active)
    print(active, event.Event[1])
    ReddotManager:SetReddotVisible(event.Event[1], active);
end

-- 红点系统事件和对象的配置表
-- ND为红点对象节点,Event为触发红点显示/隐藏的事件名
RD = {
    Email = {
        ND = "RD_Email",
        Event = {"Email"}
    }, -- 邮件
    Record = {
        ND = "RD_Record",
        Event = {"Record"}
    }, -- 战绩
    Service = {
        ND = "RD_Service",
        Event = {"Service"}
    }, -- 服务
    Notice = {
        ND = "RD_Notice",
        Event = {"Notice"}
    }, -- 通知
    Infos = {
        ND = "RD_Infos",
        Event = {"Email", "Record", "Service", "Notice"}
    } -- 信息
}

